com.cete.dynamicpdf.merger
Class MergeDocument



Example : The following example will first merge two entire PDF documents together, then will Append a selected page of a third PDF to the end.
      import com.cete.dynamicpdf.*;
      import com.cete.dynamicpdf.merger.*;
  
      public class MyClass {
        public static void main(String args[]) {
           // Create two PDF document objects
           PdfDocument pdfA = new PdfDocument( "[physicalpath]/ImportPDFA.pdf" );
           PdfDocument pdfB = new PdfDocument( "[physicalpath]/ImportPDFB.pdf" );
 
           // Merge the two documents
           MergeDocument document = MergeDocument.merge( pdfA, pdfB );
 
           // Append an additional document
           PdfDocument pdfC = new PdfDocument( "[physicalpath]/MyDocumentC.pdf" );
           document.append( pdfC, 2, 1);
 
           // Save the PDF
           document.draw( "[physicalpath]/MyDocument.pdf" );
       }
     }